package work3

class practice1 {
  trait Logger{
    """var log:Int"""
    def log(message:String): Unit ={
      println("add log")
    }
  }
  class Calculater extends Logger {
    """var log:Int=logs"""
    def add(x:Int,y:Int): Unit ={
      var sum=x+y
      println("Adding"+x+"and"+y+"Result:"+sum)
    }
    def subtract(x:Int,y:Int): Unit ={
      var sub=x-y
      println("Subtracting"+x+"from"+y+"Result:"+sub)
    }
  }
}
